# -*- coding: utf-8 -*-
# !/usr/bin/env python
from rest_framework.views import APIView
from components.resource_management.env_host_app.dao import query_env_host_app
from utils.views import Result

class PrometheusNodeExporter(APIView):
    def post(self, request):
        data = request.query_params
        host_data_list = []
        if data['env_id']:
            host_data_list = query_env_host_app(data['env_id'])
        return Result.success_response(data=host_data_list, msg='查询成功')
